package org.cuatrovientos.erp.business;


import java.util.List;

import org.cuatrovientos.erp.dao.RegisterDAO;
import org.cuatrovientos.erp.model.Register;
import org.apache.log4j.Logger;
/**
 * 
 * @author CARLOS
 *
 */

public class RegisterBO implements RegisterBOInterface {

	// Get log4j logger
	private static final Logger logger = Logger.getLogger(RegisterBO.class);
	private RegisterDAO registerDAO;
	@Override
	public Register selectById(int id) {
		// TODO Auto-generated method stub
		logger.info("selectById: " + id);
		return registerDAO.selectById(id);
	}

	@Override
	public List<Register> selectAll() {
		return registerDAO.selectAll();
	}

	@Override
	public List<Register> search(String name) {
		return registerDAO.search(name);
	}

	@Override
	public void deleteById(int id) {
		// TODO Auto-generated method stub
		registerDAO.deleteById(id);
	}

	@Override
	public void insert(Register register) {

		registerDAO.insert(register);
	}

	@Override
	public void update(Register register) {

		registerDAO.update(register);
	}

}
